//
// Created by 束庆乐 on 2024/12/23.
//
/**
* 通过指针返回多个值
*/
#include <stdio.h>
void calculate(int a, int b,int *sum,int *diff){
    *sum = a+b;
    *diff = a-b;
}

int main38(){
    int a = 5;
    int b = 3;
    int sum;
    int diff;
    calculate(a,b,&sum,&diff);
    printf("a=%d,b=%d,sum=%d,diff=%d\n",a,b,sum,diff);

    char arr[] = "hello";
//    char targets[10];
//    targets = arr;
    arr[1] = '2';
//    printf("%s\d",arr);

    char *target = "";
    target = arr;
    printf("%s\n",target);
    target[2] = 'a';
    printf("%s\n",target);

    return 0;
}